<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %>
<!doctype html>
<html lang="zh-CN">
<head>
<meta charset="utf-8">
<title>p2p贷款平台排名_最新p2p网贷平台排名_网络借款平台推荐-未来网贷</title>
<meta name="keywords" content="网贷平台排名，网络贷款平台">
<meta name="description" content="未来网贷数据频道为您提供最新p2p贷款平台排名、p2p借贷平台排名，提供几百家平台真实数据排名">
<jsp:include page="/include/header.jsp"/>
<link rel="stylesheet" type="text/css" href="${basePath }/css/shuju.css"/>
<link rel="stylesheet" type="text/css" href="${basePath }/css/jquery-ui.css">
<link rel="stylesheet" type="text/css" href="${basePath }/css/jquery-ui-1.9.2.custom.min17.css">
<link rel="stylesheet" href="${basePath }/css/datepicker.css" />
<script type="text/javascript" src="${basePath }/js/jquery-ym-datePlugin-0.1.js"></script>
<script type="text/javascript" src="${basePath }/js/date.js"></script>
<script type="text/javascript" src="${basePath }/js/datepicker.js"></script>
<script type="text/javascript" src="${basePath }/js/jquery.cookies.2.2.0.js"></script>
<script type="text/javascript" src="${basePath }/js/jquery.nicescroll.js"></script>
<script type="text/javascript" src="${basePath }/js/equal.js"></script>
<script type="text/javascript">
var i = 100000; 
var intervalid; 
intervalid = setInterval("fun()", 1); 
function fun() {  
document.getElementById("volume").innerHTML =toDecimal(i); 
document.getElementById("investment").innerHTML = Math.floor(i); 
document.getElementById("stillTime").innerHTML = toDecimal(i); 
i=i+Math.random() * 100 + 1; 
} 
//保留两位小数     
//功能：将浮点数四舍五入，取小数点后2位    
function toDecimal(x) {    
    var f = parseFloat(x);    
    if (isNaN(f)) {    
        return;    
    }    
    f = Math.round(x*100)/100;    
    return f;    
}  
</script>
<style type="text/css">
	.mytest{
		margin-top: 6px;
	  	line-height: 16px !important;
	}
	.fr{
		float:right !important;
	}
	.bt_99{
		width: 103px;
	}
	a.none-a:hover {
		color:#333;
		text-decoration: none;
		cursor:text;
	}
</style>
<script type="text/javascript">

	$(function() {
		// 初始化加载每日成交排行榜
		//初始化对比框
		
		initVolume();
		// 报表
		baobiao();
		// 對比
		duibi();
		 //提交对比后checkbox样式  
		 	$(document).on("click", ".mycheckbox", function(){
		 		var changedVariable;
		 		if($(this).parent().hasClass('checkedbg')==false){
		 			 var count=$("input[type='checkbox'][name='pingtai'][checked='checked']").length;
		 			 if(count>=5){
		 				 $('#tishi2').show();
						  $('.duibi-left p.guding').hide();
						  $('#tishi2').show().delay(3000).hide('slow');	
						  $('.duibi-left p.guding').hide().delay(3000).show('slow');
		 			 }else{
		 				 $(this).attr('checked','checked');
		 				 $(this).parent().addClass('checkedbg');
		 				 $("#duibi-right").find("li").each(function(n,value){
		 						if($(this).find("a").attr("class")=='current'){
		 							 changedVariable = $(this).find("a").attr("value");
		 						}   
		 				   });
		 				baobiao(platform(),changedVariable,$("#tubiao-tab").find('a[class=cur]').attr('value'));
		 				 }
		 		 }else{
		 		   $(this).removeAttr('checked');
		 		   if($(this).parent().hasClass('checkedbg'))
		 		   $(this).parent().removeClass('checkedbg');
		 		   $("#duibi-right").find("li").each(function(n,value){
		 				if($(this).find("a").attr("class")=='current'){
		 					 changedVariable = $(this).find("a").attr("value");
		 				}   
		 		   });
		 		  baobiao(platform(),changedVariable,$("#tubiao-tab").find('a[class=cur]').attr('value'));
		 		  }  
		 		
			});

		//添加后删除对比
			$(document).on("click",".qa",function(){
				$('.guanzhu-tishi h2').html('已删除对比');
				  $('.guanzhu-tishi').css('background-image','url(${basePath}/images/cancel_icon.png)');
				  $('#guanzhutanchu').show().delay(2000).hide(0);
				  var label = $(this).parent().find("label").attr("class");
				  $(this).parent().remove();
				  var a = $(this);
				  var oldcookeis = eval("("+$.cookie('the_cookie')+")");
					 var newcookies = new Array();
					 $.each(oldcookeis,function(index,value){
						 if(value.pid==a.attr("value")&&value.issubmit==1){
						 }else {
							 newcookies.push(value);
						 }
					 });
					 $.cookie('the_cookie', JSON.stringify(newcookies),{path:"/"});
					 var changedVariable;
					 $("#duibi-right").find("li").each(function(n,value){
	 						if($(this).find("a").attr("class")=='current'){
	 							 changedVariable = $(this).find("a").attr("value");
	 						}   
	 				   });
				if(label=='checkedbg'){//如果是选中才请求
				 baobiao(platform(),changedVariable,$("#tubiao-tab").find('a[class=cur]').attr('value'));
				}
			});
			   
		// 关注弹出
		$('#guanzhutanchu').click(function(){
			$('#guanzhutanchu').hide();
		});
		
		 //关闭
		 $(document).on("click",".duibi-list h3 a",function(){
			   $('.duibi-list').hide('slow');
			   $('.duibi-list h3 a').parent().siblings().children('li').remove();
			   var pid = new Array();
			   var the = $.cookie('the_cookie');
				var arrayObj = the==null?new Array():eval("("+the+")");
				if(the!=null){
					 var tbody = "";
					 //下面使用each进行遍历  
					 $.each(arrayObj,function(n,value) {
						 if(value.issubmit==1){
							 pid.push(value);
							 }
					  }); 
				}
				  $.cookie('the_cookie', JSON.stringify(pid),{path:"/"});
		   });
	       
		 //提交对比
		 	$(document).on("click",".duibi-list .sure a",function(){
		  // $('.duibi-list .sure a').click(function(){
			   var pid = new Array();
			   var the = $.cookie('the_cookie');
				var arrayObj = the==null?new Array():eval("("+the+")");
				if(the!=null){
				   var tbody = "";
					 //下面使用each进行遍历  
					 $.each(arrayObj,function(n,value) {
						 if(value.issubmit==0){
							 value.issubmit = 1;
					           var trs = "";
					           trs += "<li><label for='pingtai"+n+"' ><input name='pingtai' onmouseover='this.style.cursor=\"hand\"' class='mycheckbox' type='checkbox' id='pingtai"+n+"'>"+value.pname+"</label><a class='qa' href='javascript:void(0)' value="+value.pid+" title='取消对比'></a></li>";
					           tbody += trs;
					           pid[n]=value.pid;
						 }else{
							 pid[n]=0;
						 }
					  }); 
				  $.cookie('the_cookie', JSON.stringify(arrayObj),{path:"/"});
				  $('.duibi .duibi-left ul').append(tbody);
				   $('.duibi-list').hide('slow');
				   $('.duibi-list h3 a').parent().siblings().children('li').remove();
				}
			   var flag = '${sessionScope.login_user_id eq null }';
				if(flag!='true'){
					// 加入我的关注
					$.ajax({
						url:"${basePath}/data/addAttention",
						dataType:"json",
						data:{'pid':pid},
						async:false,
						success:function(data){
							if(data.msg=='ok'){
							}
						}
						
					});
				}
		   });
		 //对平台数据对比 中的日报月报周报进行处理
			$("#tubiao-tab").find('a').click(function (){
					$(this).parent().find('a').each(function(){
						if($(this).attr("class"))
						$(this).attr("class",null);
						});
					$(this).addClass('cur');
					 baobiao(platform(),$("#duibi-right").find('ul li a[class=current]').attr('value'),$(this).attr('value'));
			});
		//对平台数据对比 按照那个排序
			$("#duibi-right").find('ul li a').click(function (){
					$(this).parent().parent().parent().find('ul li a').each(function(){
						if($(this).attr("class")){
						$(this).attr("class",null);}
					});
				var changedVariable =  $(this).addClass('current').attr('value');
				  baobiao(platform(),changedVariable,$("#tubiao-tab").find('a[class=cur]').attr('value'));
				
			});
		//对平台数据对比 已关注的平台 处理
		function platform(){
			var platformArray = new Array();
			$('.duibi .duibi-left ul li').each(function(n,objectThis){
				if(!$(this).find("label").hasClass('checkedbg')==''){
					platformArray[n] = $(this).find('a').attr('value');
				}else{
					platformArray[n] =0;
				}
			});
			return platformArray;
		}
	});
	

	// 关注
	function addAttention(pid,name) {
		// 加入cookie
		var n = name;
		var flag = true;
		// 需要存的对象
		var platform = {
				'pid':pid,
				'pname':n,
				'issubmit':0
		};
		// 放入数组
		$(".duibi-list").show();
		var the = $.cookie('the_cookie');
	
		var arrayObj = the==null?new Array():eval("("+the+")");
		$.each($(".duibi-list ul").find("li"),function(m,value){
			if($(this).find("a").html()==platform.pname)
				flag = false;
		});
		 $.each(arrayObj,function(n,value){
			 if(platform.pid==value.pid&&value.issubmit&&value.issubmit==1){
				platform = {
						'pid':pid,
						'pname':name,
						'issubmit':1
				};
			}
		}); 
		if(flag){
			
			 if($(".duibi-list ul").find("li").size()>7){
				  $('.guanzhu-tishi h2').html('对不起！最多只能添加8项！');
				  $('.guanzhu-tishi').css('background','url(${basePath}/images/cancel_icon.png)  no-repeat 8px center');
				  $('.guanzhu-tishi h2').css('margin-left','20px');
				  $('#guanzhutanchu').show().delay(2000).hide(0);
			}else{
				if(platform.issubmit==0){
					arrayObj.push(platform);
					$.cookie('the_cookie', JSON.stringify(arrayObj),{path:"/"});
				}
					 $('.guanzhu-tishi h2').html('成功加入对比列表');
					 $('#guanzhutanchu').show().delay(2000).hide(0);
					 //下面使用each进行遍历  
			           var trs = "";
			           trs += "<li><a href='javascript:void(0)' title='取消对比' id=duibi"+platform.pid+" value="+platform.pid+" onclick='quxiao("+platform.pid+")'>"+platform.pname+"</a></li>";
					var duibi = $(".duibi-list").find("ul");//加入到列表中
					duibi.append(trs);
			}
		}else{
			 $('.guanzhu-tishi h2').html('不能重复添加');
			 $('#guanzhutanchu').show().delay(2000).hide(0);
		}
		}
	
	function getOrderByCondition() {
		var link = $("#formDl").find("dt").find("span").find("a[class^='visited']");
		var orderbyStyle = link.attr("class");
		var orderby = "";
		if(orderbyStyle=='visited-1') 
			orderby = "desc";
		else if(orderbyStyle=='visited-2')
			orderby = "asc";
		var column = link.attr("text");
		return {orderby:orderby, column:column};
	}
	
	function getTimeCondition() {
		var type = $(".jiansuotiaojian-left").find("a[class='current']").attr("text");
		var str = $("#demoText").val();
		if(type!=null)
			return {key:"type", value:type};
		else if(str!=null)
			return {key:"str", value:str};
		else
			return null;
	}
	
	function getProvinceCondition() {
		var text = $("#sec-city").attr("text");
		return text==null?"":text;
	}
	
		// 加载
	function loadData(paramJson,zhixing){
		$.ajax({
			type: "post",
			data:paramJson,
			url: "${basePath}/data/platformTable",
			success: function(data, textStatus){
				$(".jiazai").hide();
				//$("#tableDiv").html("");
				$("#tableDiv").html(data);
				var lastValue = $("#last").attr('value');
				if(lastValue<=15){
					$("#zhankai").hide();
			 		$("#shouqi").hide(); 
			    }else{
			    	$("#zhankai").show();
			 		$("#shouqi").hide();
			    }
				// 成功加载之后给class属性
				var sa = $("#formDl").find("dt").find("span");
				sa.each(function(n,value){
					var acla = $(this).find("a").attr("class");
					if(acla=='visited-1'||acla=='visited-2'){
					   //alert($(this).attr("text"));
						var text = $(this).attr("text");
						var sp = $("#formDl").find("dd");
						sp.each(function(n,value){
							$(this).find("span").each(function(){
								if(text==$(this).attr("text")){
									var oldspan = $(this).attr("class");
									var newspan = oldspan+' '+'blue-color';
									$(this).addClass(newspan);
								}
							});
					});
				}
				});
			},
			beforeSend:function(){
				//$("#tableDiv").html("");
				$("#tableDiv").html("<div class='jiazai' ><div class='jiazai-tishi'>正在加载中</div> </div>");
			},
			complete:function(){//自定义指标
				selectType();
			}
			});
	}
	
	// 每日成交排行榜
	function initVolume(){
		$.ajax({
			type: "post",
			url: "${basePath}/data/dayVolume",
			success: function(data, textStatus){
				//$("#paihang").html("");
				$("#paihang").html(data);
			}
		});
	}
	// 报表  第一个参数：平台ID
	//第二个参数： 排序方法
	//第三个参数：日报月报..
	var c = 0;
	function baobiao(platformIdArray,orderByVariable,dayOrMonth){
		$("#baobiao").html("");
		$("#baobiao").html(" <div class='jiazai'><div class='jiazai-tishi'>正在加载中</div> </div>");
		 $.ajax({
			type: "post",
			timeout:5000,
			url: "${basePath}/data/baobiao",
			data:{'platformIdArray':platformIdArray,'orderByVariable':orderByVariable,'dayOrMonth':dayOrMonth},
			dataType:'html',
			success: function(data, textStatus){
				$("#baobiao").html("");
				 try{$("#baobiao").html(data);}
				catch(e){
					if(c<5){
						$("#baobiao").html(" <div class='jiazai'><div class='jiazai-tishi'>正在加载中</div> </div>");
					baobiao(platformIdArray,orderByVariable,dayOrMonth);
					}
				c+=1;
				} 
			},
			beforeSend:function(){
				$("#baobiao").html("");
				$("#baobiao").html(" <div class='jiazai'><div class='jiazai-tishi'>正在加载中</div> </div>");
			}
		}); 
	}
	
	// cookie有值
	function duibi(){
		var the = $.cookie('the_cookie');
		var arrayObj = the==null?new Array():eval("("+the+")");
		var flag = '${sessionScope.login_user_id eq null }';
		if(the!=null&&flag=='true'){
			var tbody = "";
			var tbody2 = "";
			 //下面使用each进行遍历  
			 $.each(arrayObj,function(n,value) {
				  var trs = "";
		           if(n<3){
		        	   trs += "<li><label for='pingtai"+n+"' class='checkedbg'><input name='pingtai' checked='checked' class='mycheckbox' type='checkbox' id='pingtai"+n+"'>"+value.pname+"</label><a class='qa' href='javascript:void(0)' value="+value.pid+" title='取消对比'></a></li>"   
		           }else{
		        	   trs += "<li><label for='pingtai"+n+"' ><input name='pingtai' type='checkbox' class='mycheckbox' id='pingtai"+n+"'>"+value.pname+"</label><a class='qa' href='javascript:void(0)' value="+value.pid+" title='取消对比'></a></li>"
		           }
		           tbody += trs;
		           if(n<3||value.issubmit==0){
			           var str = "";
			           str += "<li><a href='javascript:void(0)' title='取消对比' id=duibi"+value.pid+" value="+value.pid+" onclick='quxiao("+value.pid+")'>"+value.pname+"</a></li>";
			           tbody2 += str;
		           }
			  });  
			//初始化购物车
			var duibi = $(".duibi-list").find("ul");
			//duibi.html("");
			duibi.html(tbody2);
			  //初始化对比
			//$('.duibi .duibi-left ul').html("");
			$('.duibi .duibi-left ul').html(tbody);
			//$(".duibi-list").show();
		}
	}
	// 取消关注
	function quxiao(id){
		//添加后取消对比		
		  $('.guanzhu-tishi h2').html('已取消对比');
		  $('.guanzhu-tishi').css('background-image','url(${basePath}/images/cancel_icon.png)');
		  $('#guanzhutanchu').show().delay(2000).hide(0);	
		 $("#duibi"+id+"").parent().remove();
		 var oldcookeis = eval("("+$.cookie('the_cookie')+")");
		 var newcookies = new Array();
		 $.each(oldcookeis,function(index,value){
			 if(value.pname==$("#duibi"+id+"").html()&&value.issubmit==0){
			 }else {
				 newcookies.push(value);
			 }
		 });
		 $.cookie('the_cookie', JSON.stringify(newcookies),{path:"/"});
	}
	
</script>
<div class="daohang-float">
   <a href="#shju" class="shju" >数据</a>
   <a href="#dbi" class="dbi" >对比</a>
   <a href="#jkong" class="jkong" >监控</a>
   <a href="#phang" class="phang" >排行</a>  
</div>
<div id="page-top">
	<jsp:include page="/include/top.jsp"/>
</div>
<!--网贷数据汇总-->
<div class="shuju-nav" id="shju">网贷数据汇总</div>
<div class="date">
	<div class="date_top" id="eachDatetop">
		<ul>
			<li class="tab_1"><a class="hovertab" href="javascript:;" onclick="platformOnclick(1)">平台数据</a></li>
			<li class="tab_2"><a href="javascript:void(0)" onclick ="platformOnclick(2)">行业数据</a></li>
			<li class="tab_3"><a href="javascript:void(0);" value="3" onclick="loginOrlogout(3)" >我的关注</a></li>
			<li class="tab_4"><a href="javascript:void(0);" onclick="platformOnclick(4)">问题平台</a></li>
		</ul>
	</div>

	<!--平台数据--> 
	<div class="dis" id="tbc_02">
		<div id="platformAppend">
		 <div class="jiazai-tishi">正在加载中</div>     
		</div>
		
		
	</div>

</div>
<div class="clear"></div>
<!--平台数据对比-->
<div class="shuju-nav" id="dbi">平台数据对比</div>
<div class="duibi">
   <div class="duibi-left">
       <h3>已选对比平台</h3>
        <p class="guding"><a href="#shju">选择平台></a></p>
        <p class="tishi" id="tishi1">请<a href="#shju"><span>选择平台</span></a>对比!</p>
        <p class="tishi" id="tishi2">最多选择<span>5个</span>平台</p>
        <ul>
        	<c:forEach items="${platList }" var="plat" varStatus="status">
        		<li><label for="pingtai${status.index+1 }" class="checkedbg"><input type="checkbox" id="pingtai${status.index+1 }" >${plat.platform_name }</label><a href="javascript:void(0)" title="取消对比"></a></li>
        	</c:forEach>
        </ul>
   </div>
   <div class="duibi-right" id="duibi-right">
        <ul>
           <li><a href="javascript:void(0)" value="volume" id="liTab1" class="current">成交量</a></li>
           <li><a href="javascript:void(0)" value="compound_interest"  >平均利率</a></li>
           <li><a href="javascript:void(0)" value="investment_num"  >投资人数</a></li>
           <li><a href="javascript:void(0)" value="borrower_num"  >借款人数</a></li>
           <li><a href="javascript:void(0)" value="average_loan_time"  >平均借款期限</a></li>
           <li><a href="javascript:void(0)" value="30_inflows"  >近30日净流入</a></li>
           <li><a href="javascript:void(0)" value="60_still"  >未来60日待还</a></li>
           <li><a href="javascript:void(0)" value="cumulative_amount" >累计待还金额</a></li>           
        </ul>
        <div class="tubiao" id="duibiTab1">
           <p>提示：点击上方指标栏以及自定义内容    可进行不同指标的直观对比</p>
           <div class="tubiao-tab" id="tubiao-tab">
               <a href="javascript:void(0)" value="1" class="cur">日报</a>
                 <a href="javascript:void(0)" value="2">周报</a>
               <a href="javascript:void(0)" value="3">月报</a>
           </div>
           <div id="baobiao"></div>
        </div>
   </div>

</div>


<!--当月数据监控开始-->
<div class="shuju-nav" id="jkong">当月数据监控<span>截止至:${month }</span></div>
<div class="jiankong-top">
  <div class="jiankong-section color-blue1">
     <div class="img"></div>
     <div class="biaoti">累计投资<span>（百万元）</span></div>
     <div class="count" id="volume"></div>
  </div>
  <div class="jiankong-section color-green">
     <div class="img"></div>
     <div class="biaoti">投资人数<span>（人）</span></div>
     <div class="count" id="investment"></div>
  </div>
  <div class="jiankong-section color-blue2">
     <div class="img"></div>
     <div class="biaoti">累计待还<span>（百万元）</span></div>
     <div class="count" id="stillTime"></div>
  </div>  
  
</div>
<div class="jiankong-bottom">
  <div class="jiankong-bottom-left">
     <ul>
        <h3>投资利率（年化）分布</h3>
        <li><span style=" width:1px;">8%以下</span><div id="volumone">${investmentInterest.volumone }</div></li>
        <li><span style=" width:1px;">8%-12%</span><div id="volumetwo">${investmentInterest.volumetwo }</div></li>
        <li><span style=" width:1px;">12%-14%</span><div id="volumethree">${investmentInterest.volumethree }</div></li>
        <li><span style=" width:1px;">14%-16%</span><div id="volumefoue">${investmentInterest.volumefoue }</div></li>
        <li><span style=" width:1px;">16%以上</span><div id="volumefive">${investmentInterest.volumefive }</div></li>
    </ul>
     <ul class="green">
        <h3>投资期限分布</h3>
        <li><span style=" width:1px;">1个月以内</span><div id="volumeonec">${investmentPeriod.volumeone }</div></li>
        <li><span style=" width:1px;">1-3个月</span><div id="volumetwoc">${investmentPeriod.volumetwo }</div></li>
        <li><span style=" width:1px;">3-6个月</span><div id="volumethreec">${investmentPeriod.volumethree }</div></li>
        <li><span style=" width:1px;">6-12个月</span><div id="volumefourc">${investmentPeriod.volumefour }</div></li>
        <li><span style=" width:1px;">12个月以上</span><div id="volumefivec">${investmentPeriod.volumefive }</div></li>
    </ul>    
  </div>
  <div class="jiankong-bottom-right" id="jiankong-bottom-right" style="height:388px;">
  <%-- <img src="${basePath }/images/shuju_04.jpg" >  --%>
  <div class='jiazai' ><div class='jiazai-tishi'>正在加载中</div> </div>
  </div>
</div>
<!--每日成交排行开始-->
<div id="paihang">
</div>






<!--关注层begin-->
<div class="tanchuzhezhao" id="guanzhutanchu" style="display: none">
<div class="zhezhaotoumingbg"></div> 
<div class="guanzhu-tishi" >
   <h2>已关注</h2>
</div>
</div>
<!--关注层end-->

<!--添加对比提示层begin-->
<div class="tianjia-zhezhao" >
<div class="tianjia-toumingbg"></div> 
<div class="tianjia-tishi">
   <h2><a href="javascript:void(0);" onclick="buzai()"></a></h2>
</div>
</div>
<!--添加对比提示层end-->
<jsp:include page="/include/footer.jsp"/>
<!-- 对平台数据对比的平台操作 -->
<div id="platformId"></div>
<script type="text/javascript">

</script>
<!--滚动条样式-->
<script type="text/javascript">
//添加对比提示
$('.guding a').click(function(){
	var show = $.cookie("isshow");
	if(show!=1){
		if($('.tianjia-tishi h2 a').hasClass('visited')==false){
			$('.tianjia-tishi h2 a').click(function(){
		         $(this).addClass('visited');
			});
			$('.tianjia-zhezhao').show();	
			//alert(cc);
		}else{
			$('.tianjia-zhezhao').hide();
		
		}
	}
});

$('.tianjia-zhezhao').click(function(){	
	$('.tianjia-zhezhao').hide();
});

function buzai(){
	$.cookie('isshow', 1, {path: '/'});
}
	
detileDataControlLength([{name:'volumone',value:$("#volumone").text()},{name:'volumetwo',value:$("#volumetwo").text()},{name:'volumethree',value:$("#volumethree").text()},{name:'volumefoue',value:$("#volumefoue").text()},{name:'volumefive',value:$("#volumefive").text()}]);
detileDataControlLength([{name:'volumeonec',value:$("#volumeonec").text()},{name:'volumetwoc',value:$("#volumetwoc").text()},{name:'volumethreec',value:$("#volumethreec").text()},{name:'volumefourc',value:$("#volumefourc").text()},{name:'volumefivec',value:$("#volumefivec").text()}]);
//处理投资利率（年化）分布和投资期限分布的css长度控制		
function detileDataControlLength(divText){
	divText.sort(function(a,b){ return a.value-b.value;});//从小到大排序
	var widthlength = 20;
	for(var i=0;i<divText.length;i++){
		$("#"+divText[i].name+"").html($("#"+divText[i].name+"").text()+"万元").parent().find('span').animate({width:"0px"},1).animate({width:widthlength = widthlength+Math.random() * 10 + 20},1000); 
	}
	
}
$(".duibi-left ul").niceScroll({  
	cursorcolor:"#fff",  
	cursoropacitymax:1,  
	touchbehavior:false,  
	cursorwidth:"5px",  
	cursorborder:"0",  
	cursorborderradius:"5px"  
}); 

</script>



<script type="text/javascript">
/**
 * 当月数据监控2015-4中的累计投资和投资人数的Ajax请求
 */
 $(function (){
	 //平台数据加载
	 platformOnclick(1);
	 //累计投资he 投资人数and 累计待还
		$.ajax({
			url: "${basePath}/data/totalInvestment",
		    type: 'post',
			success: function(data){
				clearInterval(intervalid);
				/* */
				$("#investment").html(data.investment);
				$("#volume").html(data.volume);
				$("#stillTime").html(data.stillTime);
			}}
		);
		//未来网贷当月投资金额监控数据报表
		 $.ajax({
			url: "${basePath}/data/amountOfInvestmentControl",
		    type: 'post',
		    dataType: "html",
			success: function(data){
				//$("#jiankong-bottom-right").html("");
				$("#jiankong-bottom-right").html(data);
	      }}
		); 	
		
 });
function platformOnclick(platformWho){
	$(".guanjianci").hide();
	//$("#platformAppend").html("");
	$("#platformAppend").html("<div class='jiazai' ><div class='jiazai-tishi'>正在加载中</div> </div>");
	 $.ajax({
			url: "${basePath}/data/platformOnclick",
		    type: 'post',
		    data:{'platformWho':platformWho},
		    dataType: "html",
			success: function(data){
				//$("#platformAppend").html("");
				$("#platformAppend").html(data);
	      }});
}
function loginOrlogout(platformWho){
	if(popLogin('${basePath}/data/attention.html')){
		 platformOnclick(3);
	}
}
$("#eachDatetop").find("li").click(function (){
	if( $(this).find('a').attr('value')!=3 || ($(this).find('a').attr('value')==3 && popLogin('${basePath}/data/attention.html'))){		
	$("#eachDatetop").find("li a").each(function (){if($(this).attr("class"))$(this).attr("class",null);});
	$(this).find('a').addClass('hovertab');
	}
});


	  	  	  
</script>
